Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore __init__ method if parameter is only only **kwargs arguments. #798

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

koxudaxi
Copy link
Owner

Closes: #471 #796

Often, Third party libraries override BaseModel's __init__ with **kwargs. So, the PyCharm will no longer perform completion and type checking.
Setting ignore-init-method-arguments = true causes init method to be ignored, but for convenience, add a new ignore-init-method-keyword-arguments and enable it by default

@codecov
Copy link

codecov bot commented Sep 10, 2023

Codecov Report

Patch coverage: 75.00% and no project coverage change.

Comparison is base (2a9bc63) 71.97% compared to head (422bc01) 71.98%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #798   +/-   ##
=======================================
  Coverage   71.97%   71.98%           
=======================================
  Files          27       27           
  Lines        2066     2081   +15     
  Branches      636      642    +6     
=======================================
+ Hits         1487     1498   +11     
- Misses        275      277    +2     
- Partials      304      306    +2     
Files Changed Coverage Δ
src/com/koxudaxi/pydantic/PydanticInitializer.kt 57.42% <0.00%> (-1.17%) ⬇️
src/com/koxudaxi/pydantic/Pydantic.kt 76.58% <84.61%> (+0.20%) ⬆️
src/com/koxudaxi/pydantic/PydanticConfigService.kt 83.33% <100.00%> (+0.98%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

Qodana Community for Python

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2023.2.6
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@koxudaxi koxudaxi merged commit b90b88b into main Sep 12, 2023
5 checks passed
@koxudaxi koxudaxi deleted the fix_incorrect_init_interpretation branch September 12, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redis-OM JsonModel subclasses BaseModel but does not use type hints in method arguments popup
1 participant